home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 52
/
Amiga Format AFCD52 (Issue 136, May 2000).iso
/
-serious-
/
programming
/
other
/
littelcomp
/
r5
/
lc
/
examples
/
test.library.l
< prev
next >
Wrap
Text File
|
2000-02-28
|
1KB
|
56 lines
;,// LITTEL v0.17b - lets make a little library
#mode LIBRARY 37 1 "test.library" "test.library by me 2000"
#link library.lib ; must do this.
#incdir "app:progg/asm/phxass/examples/include/lib/"
#include "dos.i"
#makefd test_lib.fd _TestBase ; make .fd file for it
;#makei test_lib.i
;#makelvo test_lib.lvo
#fdef Inc10 (val)(d0) ;// make our functions public, starting at -30
#fdef Inc100 (val)(d0)
#fdef Inc10p (val)()
#fdef Delay100 ()()
#fdef bla ()()
#endfdef
#LibraryEnv OFF ; we will not use any globals, but want to preserve regs.
PROC Inc10
inc D0 10
ENDPROC ;// just a silly example //
PROC Inc100
inc D0 100
ENDPROC
PROC Inc10p %param
CODESTART
inc %param 10
ENDPROC %param
#LibraryEnv STARTUP ; we want to use startup globals, no extra regs preserved.
PROC Delay100
copy 100 D0
copy 100 D1
call _DOSBase Delay ; using the startup global
ENDPROC
GVAR _nisse ; shared global
#LibraryEnv SHARED ; we want to use shared globals, regs are preserved.
PROC bla
INC _nisse ; using the shared global..
ENDPROC
END